
import VueRouter from "vue-router";
import Home from "@/pages/Home/Home.vue";
import Login from "@/pages/Login/Login.vue";
import Register from "@/pages/Register/Register.vue";
import Search from "@/pages/Search/Search.vue";
import Detail from "@/pages/Detail/Detail.vue";
import addCartSuccess from "@/pages/AddCartSuccess/AddCartSuccess.vue";
import ShopCart from "@/pages/ShopCart/ShopCart.vue";



// let routes = new VueRouter({
    let routes = [
        {
            //     重定向路由，设置访问网址的默认显示页
            path:'*',
            redirect:'/home',
        },
        {
            path: '/home',
            component: Home,
            meta:{footerShow:true}

        },
        {
            path: '/login',
            component: Login,
            meta:{footerShow:false}
        },
        {
            path: '/register',
            component: Register,
            meta:{footerShow:false}
        },
        {
            name:'search',
            path: '/search',
            component: Search,
            meta:{footerShow:true}
        },
        {
            name:'detail',
            path: '/detail/:goodsId',
            component: Detail,

        },
        {
            name:'addcartsuccess',
            path: '/addcartsuccess',
            component: addCartSuccess,

        },
        {
            name:'shopcart',
            path: '/shopcart',
            component: ShopCart,

        },


    ]
// })

export default routes;